---
layout: example.html
title: Mousewheel/Trackpad Zoom
shortdesc: Restrict wheel/trackpad zooming to integer zoom levels.
docs: >
  By default, the `ol.interaction.MouseWheelZoom` can leave the map at
  fractional zoom levels. If instead you want to constrain wheel/trackpad
  zooming to integer zoom levels, set <code>constrainResolution: true</code>
  when constructing the interaction.
tags: "trackpad, mousewheel, zoom, interaction"
---
<div id="map" class="map"></div>
